home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 March
/
CMCD0305.ISO
/
Software
/
Shareware
/
Utilitare
/
emu
/
Emu8086_Setup_307c.exe
/
{app}
/
Samples
/
bintest.asm
< prev
next >
Wrap
Assembly Source File
|
2002-08-02
|
2KB
|
95 lines
; This is an example of how to
; make a ".BIN" file.
; Directive to create BIN file:
#make_BIN#
; where to load?
#LOAD_SEGMENT=1234#
#LOAD_OFFSET=0000#
; set these values to registers on load:
#AL=12#
#AH=34#
#BH=56#
#BL=78#
#CH=9A#
#CL=BC#
#DH=DE#
#DL=F0#
#DS=DDEE#
#ES=ABCD#
#SI=AAAA#
#DI=CCCC#
#BP=DDDD#
#CS=1234#
#IP=0000#
#SS=3000#
#SP=FFFF#
; When loading "bintest.bin" file in emulator
; it will look for a "bintest.binf" file,
; and load ".BIN" file to location specified
; in that file, registers are also set using
; information in that file (open this file
; in a text editor to edit or investigate).
;
; ".binf" file is created automatically
; by compiler when it processes the above
; directives.
; This sample just prints out a part of
; some ASCII character set, in an eternal
; loop, press [Stop] button or ESC to stop.
start:
MOV AL, '0'
MOV AH, 0Eh
print_more:
INT 10h
INC AL
; keep original AX:
MOV CX, AX
;============================
; check for ESC key to
; reboot:
; check for keystroke in
; keyboard buffer:
MOV AH, 1
INT 16h
JZ key_processed
; get keystroke from keyboard:
; (remove from the buffer)
MOV AH, 0
INT 16h
; press 'ESC' to exit:
CMP AL, 1Bh
JNZ key_processed
INT 19h
key_processed:
;============================
; restore original AX:
MOV AX, CX
CMP AL, 'z'
JBE print_more
MOV AL, '0'
JMP print_more
END